home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-03-20 | 2.1 KB | 71 lines | [TEXT/CWIE] |
- UNIT StubLDEF;
-
- (*
- File: StubLDEF.p
-
- Contains: An LDEF that simply routes the call through the list's
- refCon, thereby allowing us to have the actual code in
- the main body of the application.
-
- Written by: Forrest Tanaka
-
- Copyright: © 1988-1997 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided "AS IS" and the
- responsibility for its operation is 100% yours. However, what you are
- not permitted to do is to redistribute the source as "DSC Sample Code"
- after having made changes. If you're going to re-distribute the source,
- we require that you make it clear in the source that the code was
- descended from Apple Sample Code, but that you've made changes.
- *)
-
- INTERFACE
-
- USES
- Types,
- Lists;
-
- {$main}
- PROCEDURE StubLDEF (message: Integer;
- selectCell: Boolean;
- cellRect: Rect;
- theCell: Cell;
- dataOffset: Integer;
- dataLength: Integer;
- theList: ListHandle);
-
- IMPLEMENTATION
-
- PROCEDURE CallProc (message: Integer;
- selectCell: Boolean;
- cellRect: Rect;
- theCell: Cell;
- dataOffset: Integer;
- dataLength: Integer;
- theList: ListHandle;
- proc: ProcPtr);
- INLINE
- $205F, (* move.l (sp)+,a0 *)
- $4E90; (* jmp (a0) *)
-
- PROCEDURE StubLDEF (message: Integer;
- selectCell: Boolean;
- cellRect: Rect;
- theCell: Cell;
- dataOffset: Integer;
- dataLength: Integer;
- theList: ListHandle);
- VAR
- proc: ProcPtr;
- BEGIN
- proc := ProcPtr(theList^^.refCon);
- IF proc <> nil THEN BEGIN
- CallProc(message, selectCell, cellRect, theCell, dataOffset, dataLength, theList, proc);
- END;
- END; (* StubLDEF *)
-
- END.
-